<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>回调地狱</title>
</head>
<body>
    
</body>
<script>
//回调地狱 当回调函数互相嵌套，嵌套层级过多，代码维护性变差
function ajax(url,sucesscb,errorcb){
    setTimeout(()=>{
        sucesscb('1111')
    },1000)
}
    ajax('/aaa',(data)=>{
        ajax('/bbb',(data)=>{
            ajax('/ccc',(data)=>{

            },()=>{
            })
        },()=>{
    })
    },()=>{
    })
</script>
</html>